import React, { Component } from 'react'
import { NavLink } from 'react-router-dom'
import RouterView from '../../router/routerView'
import Footer from '../../components/footer'
import Islogin from '../../utils/IsLogin'
export class Index extends Component {
    render() {

        let { routerConfig } = this.props

        let routerList = routerConfig.filter(item => !item.redirect)
        return ( 

            <div  className="wrap">
                <div className="header">
                    <div className="zuo">
                        <img src={require('../../images/2.png').default} alt=""/>
                    </div>
                    <div className="you">
                        <img src={require('../../images/1.png').default} alt=""/>
                    </div>
                    <div className='x'>
                        {
                            routerList.map((item, index) => {
                                return <NavLink key={index} to={item.path}>
                                    {item.title}
                                </NavLink>
                            })
                        }
                    </div>
                    
                </div>
                <div className="content">
                    <RouterView routerConfig={routerConfig}></RouterView>
                </div>
                <Footer></Footer>
            </div>
        )
    }
}

export default Islogin(Index)
